﻿using Baik.Interface.Execution;
using Baik.Interface.Expression;
using Baik.Interface.Framework;

namespace Baik.Expression
{
    public class ReturnExpression : Expression, Baik.Interface.Expression.IReturn
    {
        public ReturnExpression(IInjector inject) : base(inject)
        {
        }
        public override IObject Evaluate()
        {
            return Value.Evaluate(EvaluationScope);
        }
        public override string AsString()
        {
            return "return " + Value.AsString();
        }
        public IExpression Value { get; set; }
    }
}